package uk.co.hs.hibernate;

import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;

import org.joda.time.DateTime;

import uk.co.hs.domain.generic.UtilisoftGenericDomain;

/**
 * LastUpdatedListener.
 */
public class LastUpdatedListener
{
  @PreUpdate
  @PrePersist
  public void setLastUpdate(UtilisoftGenericDomain<?> aEntity)
  {
    aEntity.setLastUpdated(new DateTime());
  }
}
